]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
popupMenu: Fix RemoteMenu items with boolean state action
authorFlorian Müllner <fmuellner@gnome.org>
Fri, 27 Apr 2012 09:57:48 +0000 (11:57 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Fri, 27 Apr 2012 10:30:16 +0000 (12:30 +0200)
Stateful actions are expected to pass their state when activated,
but we currently only do this for actions with a string state.

https://bugzilla.gnome.org/show_bug.cgi?id=674932

js/ui/popupMenu.js

index 09a9b737dc1e316043756191cb9394475268fda7..b1a06ed9c46acb5a40d78a36e05156039edafc86 100644 (file)
@@ -1867,7 +1867,7 @@ const RemoteMenu = new Lang.Class({
                 item = new PopupSwitchMenuItem(label, action.state.get_boolean());
                 action.items.push(item);
                 specificSignalId = item.connect('toggled', Lang.bind(this, function(item) {
-                    this.actionGroup.activate_action(action_id, null);
+                    this.actionGroup.activate_action(action_id, GLib.Variant.new_boolean(item.state));
                 }));
                 break;
             case 's':